home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / test / Makefile < prev    next >
Encoding:
Makefile  |  1992-08-27  |  8.3 KB  |  442 lines

  1. # ----------------
  2. #    NOTE: THIS PMAKEFILE IS INCOMPLETE - DO NOT ATTEMPT TO USE - cim
  3. # ----------------
  4.  
  5. # ----------------------------------------------------------------
  6. #    Makefile for POSTGRES test programs
  7. #
  8. #    $Header: /private/postgres/src/test/RCS/Makefile,v 1.3 1989/09/05 16:53:57 mao Version_2 $
  9. # ----------------------------------------------------------------
  10.  
  11. # ----------------
  12. #    conf.local contains all the configuration definitions
  13. # ----------------
  14.  
  15. #include "conf.local"
  16.  
  17. # ----------------
  18. #    support settings - here only for example
  19. # ----------------
  20.  
  21. AMIINT        =    $(DATAHOME)/bin/amiint
  22. SCRDIR        =    $(DATAHOME)/src/support
  23.  
  24. DFLAGS        =    -DAMIINT='"$(AMIINT)"' \
  25.             -DSCRDIR='"$(SCRDIR)"' \
  26.             -DDATAHOME='"$(DATAHOME)"'
  27.  
  28. BUFIFLAGS    =    -I$(OBJDIR)/storage/buffer
  29.  
  30. IFLAGS        =    -I$(HDRDIR)
  31.  
  32. CFLAGS        =    -O -DEBUG -DPOSTMASTERLOG -DVACUUMDLOG $(IFLAGS)
  33.  
  34. LIBS        =    -lm -ll
  35.  
  36. # ----------------
  37. #    clean these up
  38. # ----------------
  39.  
  40. SUPPORT=../support
  41. IFLAGS=    -I../h
  42. CP=    cp
  43. CFLAGS= -g $(IFLAGS)
  44. CHMOD=    chmod
  45. MALLOC=    /usr/lib/debug/malloc.o
  46. BINMODE=751
  47. SUMODE=    751
  48. ROMODE=    444
  49. SHMOD=    755
  50.  
  51. DEFAULT=@echo "***" No default
  52.  
  53. # ----------------
  54. #    port.mk contains port-specific information, including
  55. #    PORTSRCDIR and PORTOBJDIR
  56. # ----------------
  57.  
  58. #include "CONF/port.mk"
  59.  
  60. # ----------------
  61. #    Definition of search paths
  62. # ----------------
  63.  
  64. PMAKE_VPATH_SRCS ?=    ./ \
  65.             $(SRCDIR)/$(LISPLIB) \
  66.             $(SRCDIR)/access/genam \
  67.             $(SRCDIR)/access/heap \
  68.             $(SRCDIR)/access/index-btree \
  69.             $(SRCDIR)/access/spam \
  70.             $(SRCDIR)/access/tuple \
  71.             $(SRCDIR)/commands \
  72.             $(SRCDIR)/lib/C \
  73.             $(SRCDIR)/lib/libpq \
  74.             $(SRCDIR)/lib/libpq/demo \
  75.             $(SRCDIR)/lib/libpqcl \
  76.             $(SRCDIR)/lib/catalog \
  77.             $(SRCDIR)/parser \
  78.             $(SRCDIR)/storage/buffer \
  79.             $(SRCDIR)/storage/ipc \
  80.             $(SRCDIR)/storage/lmgr \
  81.             $(SRCDIR)/storage/page \
  82.             $(SRCDIR)/storage/file \
  83.             $(SRCDIR)/support \
  84.             $(SRCDIR)/test \
  85.             $(SRCDIR)/utils/adt \
  86.             $(SRCDIR)/utils/cache \
  87.             $(SRCDIR)/utils/fmgr \
  88.             $(SRCDIR)/utils/init \
  89.             $(SRCDIR)/utils/mmgr \
  90.             $(SRCDIR)/utils/error \
  91.             $(SRCDIR)/utils/comm \
  92.             $(SRCDIR)/utils/xact \
  93.             $(SRCDIR)/utils/time \
  94.             $(SRCDIR)/utils/rules
  95.  
  96. PMAKE_VPATH_HDRS ?=    ./ $(SRCDIR) $(HDRDIR)
  97.  
  98. PMAKE_VPATH_OBJS ?=    ./ \
  99.             $(OBJDIR)/$(LISPLIB) \
  100.             $(OBJDIR)/access/genam \
  101.             $(OBJDIR)/access/heap \
  102.             $(OBJDIR)/access/index-btree \
  103.             $(OBJDIR)/access/spam \
  104.             $(OBJDIR)/access/tuple \
  105.             $(OBJDIR)/commands \
  106.             $(OBJDIR)/lib/C \
  107.             $(OBJDIR)/lib/libpq \
  108.             $(OBJDIR)/lib/libpq/demo \
  109.             $(OBJDIR)/lib/libpqcl \
  110.             $(OBJDIR)/lib/catalog \
  111.             $(OBJDIR)/parser \
  112.             $(OBJDIR)/storage/buffer \
  113.             $(OBJDIR)/storage/ipc \
  114.             $(OBJDIR)/storage/lmgr \
  115.             $(OBJDIR)/storage/page \
  116.             $(OBJDIR)/storage/file \
  117.             $(OBJDIR)/support \
  118.             $(OBJDIR)/test \
  119.             $(OBJDIR)/utils/adt \
  120.             $(OBJDIR)/utils/cache \
  121.             $(OBJDIR)/utils/fmgr \
  122.             $(OBJDIR)/utils/init \
  123.             $(OBJDIR)/utils/mmgr \
  124.             $(OBJDIR)/utils/error \
  125.             $(OBJDIR)/utils/comm \
  126.             $(OBJDIR)/utils/xact \
  127.             $(OBJDIR)/utils/time \
  128.             $(OBJDIR)/utils/rules
  129.  
  130. # ----------------
  131. #    Definition of sources
  132. # ----------------
  133.  
  134.  
  135. MAINCODE= testinit.c
  136.  
  137. MAINOBJ= testinit.o
  138.  
  139. CFILES=    testinit.c \
  140.     testbtdel.c \
  141.     testbtree.c \
  142.     testbuf.c \
  143.     testcache.c \
  144.     testlock.c \
  145.     testmmgr.c \
  146.     testpsort.c \
  147.     testxact.c \
  148.     testxid.c \
  149.     testxlog.c
  150.  
  151. SPECIAL1SRC=    ../fmgr/fmgr.c
  152. SPECIAL2SRC=    ../util/syscache.c
  153. SPECIAL1=    fmgr.o
  154. SPECIAL2=    syscache.o
  155. SPECIAL= \
  156.     $(SPECIAL1) \
  157.     $(SPECIAL2)
  158.  
  159.  
  160. LIBSSPAM=\
  161.     initspam.o \
  162.     log-blocktuple.o \
  163.     log-primitives.o \
  164.     log-scan.o \
  165.     log-tuple.o \
  166.     spam-accessors.o \
  167.     spam-control.o \
  168.     spam-debug.o \
  169.     spam-index.o \
  170.     spam-mmgr.o \
  171.     spam-primitives.o \
  172.     spam-utils.o \
  173.     time-blocktuple.o \
  174.     time-dirtuple.o \
  175.     time-primitives.o \
  176.     var-access.o \
  177.     xlog.o \
  178.     xtim.o 
  179.  
  180. LIBS0=    $(LIBSSPAM) \
  181.     $(SPECIAL) \
  182.     access.o \
  183.     assert.o \
  184.     att.o \
  185.     attnum.o \
  186.     attval.o \
  187.     bit.o \
  188.     block.o \
  189.     bool.o \
  190.     btdata.o \
  191.     bthacks.o \
  192.     bthdr.o \
  193.     btinsrt.o \
  194.     btitem.o \
  195.     btkey.o \
  196.     btlock.o \
  197.     btnode.o \
  198.     btpage.o \
  199.     btqual.o \
  200.     btree.o \
  201.     btscan.o \
  202.     btsrch.o \
  203.     btstk.o \
  204.     btstrat.o \
  205.     buf.o \
  206.     bufmgr.o \
  207.     bufpage.o \
  208.     buf_sync.o \
  209.     catalog.o \
  210.     catcache.o \
  211.     catname.o \
  212.     char.o \
  213.     cinit.o \
  214.     context.o \
  215.     create.o \
  216.     creati.o \
  217.     date.o \
  218.     datum.o \
  219.     dlog.o \
  220.     dt.o \
  221.     elog.o \
  222.     fd.o \
  223.     float.o \
  224.     form.o \
  225.     format.o \
  226.     ftup.o \
  227.     genam.o \
  228.     geo-ops.o \
  229.     geo-selfuncs.o \
  230.     hash.o \
  231.     hashlib.o \
  232.     heapam.o \
  233.     hio.o \
  234.     hrnd.o \
  235.     htup.o \
  236.     imark.o \
  237.     int.o \
  238.     inval.o \
  239.     ipc.o \
  240.     ipci.o \
  241.     iqual.o \
  242.     isop.o \
  243.     istrat.o \
  244.     itemid.o \
  245.     itemptr.o \
  246.     itup.o \
  247.     linval.o \
  248.     lmgr.o \
  249.     magic.o \
  250.     mmgr.o \
  251.     name.o \
  252.     newam.o \
  253.     numutils.o \
  254.     off.o \
  255.     oid.o \
  256.     order.o \
  257.     page.o \
  258.     pagenum.o \
  259.     part.o \
  260.     pcomm.o \
  261.     pladt.o \
  262.     pladtdeb.o \
  263.     pldebug.o \
  264.     plm.o \
  265.     plsync.o \
  266.     pos.o \
  267.     pskip.o \
  268.     rac.o \
  269.     regproc.o \
  270.     rel.o \
  271.     relcache.o \
  272.     sdir.o \
  273.     selfuncs.o \
  274.     sinval.o \
  275.     sinvaladt.o \
  276.     skey.o \
  277.     tim.o \
  278.     tqual.o \
  279.     trange.o \
  280.     tup.o \
  281.     tuple.o \
  282.     utils.o \
  283.     valid.o \
  284.     varlena.o \
  285.     xcxt.o \
  286.     xid.o \
  287.     xstate.o
  288.  
  289.  
  290. LIBSCACHE=    $(LIBS0) printtup.o
  291.  
  292. LIBSPS=    $(LIBS0) \
  293.     lselect.o \
  294.     psort.o
  295.  
  296. LIBSSHM=    $(LIBS0) shmbuf.o
  297.  
  298.  
  299. SRCS=    $(HFILES) $(CFILES)
  300.  
  301.  
  302. ALL=    testbtree testbtdel testbuf testcache testlock testmmgr testpsort \
  303.     testxact testxid testxlog testvacuum
  304.  
  305. stdout        ?=    /dev/tty
  306.  
  307. # ----------------
  308. #    default.mk contains standard make information like
  309. #    transformation rules, what compiler to use, etc.
  310. # ----------------
  311.  
  312. #include "CONF/default.mk"
  313.  
  314. # ----------------
  315. #    targets
  316. # ----------------
  317.  
  318. .MAIN:    Main
  319.  
  320. Main:    $(ALL)
  321.  
  322. # ----------------
  323. #    targets - for the most part ok
  324. # ----------------
  325.  
  326. #vacuum.o: $(SUPPORT)/vacuum.c
  327. #    $(cc) -c $(SUPPORT)/vacuum.c
  328.  
  329. testvacuum: $(MAINOBJ) testvacuum.o $(LIBS0) vacuum.o
  330.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS)
  331.     $(chmod) $(BINMODE) $(.TARGET)
  332.  
  333. testbtdel: $(MAINOBJ) testbtdel.o $(LIBS0)
  334.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  335.     $(chmod) $(BINMODE) $(.TARGET)
  336.  
  337. testbtree: $(MAINOBJ) testbtree.o $(LIBS0)
  338.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  339.     $(chmod) $(BINMODE) $(.TARGET)
  340.  
  341. testbuf: $(MAINOBJ) testbuf.o $(LIBS0)
  342.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  343.     $(chmod) $(BINMODE) $(.TARGET)
  344.  
  345. testcache: $(MAINOBJ) testcache.o $(LIBSCACHE)
  346.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  347.     $(chmod) $(BINMODE) $(.TARGET)
  348.  
  349. testdefine: $(MAINOBJ) testdefine.o $(LIBS0)
  350.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  351.     $(chmod) $(BINMODE) $(.TARGET)
  352.  
  353. testlock: $(MAINOBJ) testlock.o $(LIBS0)
  354.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  355.     $(chmod) $(BINMODE) $(.TARGET)
  356.  
  357. testmmgr: $(MAINOBJ) testmmgr.o $(LIBS0)
  358.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  359.     $(chmod) $(BINMODE) $(.TARGET)
  360.  
  361. testpsort: $(MAINOBJ) testpsort.o $(LIBSPS)
  362.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  363.     $(chmod) $(SUMODE) $(.TARGET)
  364.  
  365. testshm: $(MAINOBJ) testshm.o $(LIBSSHM)
  366.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  367.     $(chmod) $(BINMODE) $(.TARGET)
  368.  
  369. testxact: $(MAINOBJ) testxact.o $(LIBS0)
  370.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  371.     $(chmod) $(BINMODE) $(.TARGET)
  372.  
  373. testxid: $(MAINOBJ) testxid.o $(LIBS0)
  374.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  375.     $(chmod) $(BINMODE) $(.TARGET)
  376.  
  377. # ----------------
  378. #    change programs to $variables
  379. # ----------------
  380.  
  381. testxlog: $(MAINOBJ) testxlog.o xlog_parser.o xlog_lexer.o $(LIBS0)
  382.     $(echo) $(LIBS0) > testxlog.tmp
  383.     $(mv) testxlog.tmp testxlog.files
  384.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  385.     $(chmod) $(BINMODE) $(.TARGET)
  386.  
  387. xlog_parser.o:  xlog_parser.y
  388.     $(yacc) xlog_parser.y
  389.     $(mv) y.tab.c xlog_parser.c
  390.     $(cc) -c $(CFLAGS) xlog_parser.c
  391.  
  392. xlog_lexer.o:   xlog_lexer.c
  393.     $(cc) -c $(CFLAGS) xlog_lexer.c
  394.  
  395. xlog_lexer.c:
  396.     $(lex) xlog_lexer.l
  397.     $(mv) lex.yy.c xlog_lexer.c
  398.  
  399. # ----------------
  400. #    incomplete - fix this
  401. # ----------------
  402.  
  403. $(SPECIAL1): $(SPECIAL1SRC)
  404.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  405.     $(chmod) $(BINMODE) $(.TARGET)
  406.  
  407.     echo "Making $@ ... "
  408.     (cd $(SUPPORT) && \
  409.         exec make $(MFLAGS) $(SPECIAL1))
  410.     cmp -s $(SUPPORT)/$(SPECIAL1) $@ || cp $(SUPPORT)/$(SPECIAL1) $@
  411.                     
  412. $(SPECIAL2): $(SPECIAL2SRC)
  413.     $(cc) -o $(.TARGET) $(.ALLSRC) $(LIBS) 
  414.     $(chmod) $(BINMODE) $(.TARGET)
  415.  
  416.     echo "Making $@ ... "
  417.     (cd $(SUPPORT) && \
  418.         exec make $(MFLAGS) $(SPECIAL2))
  419.     cmp -s $(SUPPORT)/$(SPECIAL2) $@ || cp $(SUPPORT)/$(SPECIAL2) $@
  420.  
  421. # ----------------
  422. #    clean these up
  423. # ----------------
  424.  
  425. clean:
  426.     $(rm) eddep makedep tags *.o
  427.  
  428. lint:    $(SRCS)
  429.     $(lint) $(SRCS)
  430.  
  431. tags:    $(SRCS)
  432.     $(ctags) $(SRCS)
  433.  
  434. print:    $(SRCS)
  435.     $(pr) Makefile $(SRCS)
  436.  
  437. # ----------------
  438. #    subroutine to print a starting message
  439. # ----------------
  440. START : .ZEROTIME .SILENT .IGNORE
  441.     $(echo) "PMake in progress..." >> $(stdout)
  442.